// Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net>
//
// This file is part of FileBow.
//
// FileBow is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// FileBow is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with FileBow.  If not, see <http://www.gnu.org/licenses/>.

// Geany FileBow Plugin entry point.

#include "ui/plugin.h"

#include <gtk/gtk.h>

filebow::Plugin* pluginMain;

extern "C" void filebow_plugin_init() {
  pluginMain = new filebow::Plugin();
  pluginMain->SetupMenu();
  pluginMain->SetupHandlers();
  pluginMain->SetupKeys();
  pluginMain->LoadProject();
}

extern "C" void filebow_plugin_cleanup() {
	delete pluginMain;
}

extern "C" void filebow_on_project_open() {
  pluginMain->LoadProject();
}
extern "C" void filebow_on_project_save() {
}
extern "C" void filebow_on_project_close() {
}
extern "C" void filebow_on_document_open(const gchar* file) {
  pluginMain->HandleOpen(file);
}
extern "C" void filebow_on_document_activate(const gchar* file) {
  pluginMain->HandleActivate(file);
}
extern "C" void filebow_on_document_close(const gchar* file) {
  pluginMain->HandleClose(file);
}

